import { Controller, Get } from '@nestjs/common';
import { OrderService } from './order.service';
import { wrapperResponse } from '../utils/index';


@Controller('order/dashboard')
export class OrderController {
  constructor(private readonly orderService: OrderService) { }

  @Get('/getReportData')
  getReportData() {
    return wrapperResponse(this.orderService.getReportData(), '获取工作台数据成功')
  }

  @Get('/getLineData')
  getLineData() {
    return wrapperResponse(this.orderService.getLineData(), '获取折线图数据成功')
  }

  @Get('/getPieCityData')
  getPieCityData() {
    return wrapperResponse(this.orderService.getPieCityData(), '获取城市数据成功')
  }

  @Get('/getPieAgeData')
  getPieAgeData() {
    return wrapperResponse(this.orderService.getPieAgeData(), '获取年龄数据成功')
  }

  @Get('/getRadarData')
  getRadarData() {
    return wrapperResponse(this.orderService.getRadarData(), '获取雷达图数据成功')
  }
}
